package com.biz.model.Hmodel.base;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by lzq.
 */

@Entity
@Table(name = "t_sys_dynamic")
public class TSysDynamic {
    private String id;
    private String title;
    private String picture;
    private Date creatTime;
    private String releasePerson;
    private String description;
    private String graphicDetails;
    private Short isdel;
    private Short state;

    @Id
    @Column(name = "id", nullable = false, length = 50)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "title", nullable = false, length = 255)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "picture", nullable = false, length = 255)
    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    @Basic
    @Column(name = "creatTime", nullable = false)
    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    @Basic
    @Column(name = "releasePerson", nullable = false, length = 50)
    public String getReleasePerson() {
        return releasePerson;
    }

    public void setReleasePerson(String releasePerson) {
        this.releasePerson = releasePerson;
    }

    @Basic
    @Column(name = "description", nullable = true, length = 500)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "graphicDetails", nullable = true, length = 500)
    public String getGraphicDetails() {
        return graphicDetails;
    }

    public void setGraphicDetails(String graphicDetails) {
        this.graphicDetails = graphicDetails;
    }

    @Basic
    @Column(name = "isdel", nullable = false)
    public Short getIsdel() {
        return isdel;
    }

    public void setIsdel(Short isdel) {
        this.isdel = isdel;
    }

    @Basic
    @Column(name = "state", nullable = false)
    public Short getState() {
        return state;
    }

    public void setState(Short state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TSysDynamic that = (TSysDynamic) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (picture != null ? !picture.equals(that.picture) : that.picture != null) return false;
        if (creatTime != null ? !creatTime.equals(that.creatTime) : that.creatTime != null) return false;
        if (releasePerson != null ? !releasePerson.equals(that.releasePerson) : that.releasePerson != null)
            return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        if (graphicDetails != null ? !graphicDetails.equals(that.graphicDetails) : that.graphicDetails != null)
            return false;
        if (isdel != null ? !isdel.equals(that.isdel) : that.isdel != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (picture != null ? picture.hashCode() : 0);
        result = 31 * result + (creatTime != null ? creatTime.hashCode() : 0);
        result = 31 * result + (releasePerson != null ? releasePerson.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (graphicDetails != null ? graphicDetails.hashCode() : 0);
        result = 31 * result + (isdel != null ? isdel.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        return result;
    }
}
